import request from '@/utils/request';
import { TableListQueryParams, TableListItem } from './data.d';

export async function queryList(params?: TableListQueryParams): Promise<any> {
  return request({
    url: '/adminuser/GetPage',
    method: 'POST',
    data:params
  });
}
export async function AdminuserAdd(params:any): Promise<any> {
  return request({
    url: '/adminuser/Add',
    method: 'POST',
    data:params
  });
}
export async function AdminuserUpdate(params?: TableListQueryParams): Promise<any> {
  return request({
    url: '/adminuser/Update',
    method: 'POST',
    data:params
  });
}
export async function AdminuserDelete(params?: any): Promise<any> {
  return request({
    url: '/adminuser/delete',
    method: 'POST',
    data:params
  });
}
export async function AdminRoleList(params?: any): Promise<any> {
  return request({
    url: '/admin-role/list',
    method: 'POST',
    data:params
  });
}
export async function ApiRoleList(params?: any): Promise<any> {
  return request({
    url: '/adminuserrole/GetListByAdmin',
    method: 'POST',
    data:params
  });
}
export async function ApiUpdateRole(params?: any): Promise<any> {
  return request({
    url: '/adminuserrole/update-user-role',
    method: 'POST',
    data:params
  });
}